package be.kuleuven.cs.mop.gui.util;



/**
 * Skeletal implementation of a representation-wrapper
 */
public abstract class Representation<T> {
	
	private T subject;
	
	
	public Representation(final T subject) {
		set(subject);
	}
	
	
	
	/**
	 * Returns the subject of this {@link Representation}
	 */
	public T get() { return subject; }
	
	private final void set(final T subject) {
		if (subject == null)
			throw new NullPointerException();
		
		this.subject = subject;
	}
	
	/**
	 * Returns a <code>String</code>-representation of the subject
	 * 	of this {@link Representation}
	 */
	@Override
	public abstract String toString();
	
}